interface DbBaseDateQueryInterface {
  created_at: string
  updated_at: string
}

/** module name: food */
/** module name: letter */
export namespace Letter {
  export interface LetterInterface extends DbBaseDateQueryInterface {
    id: number
    title: string
    content: string
    current: string
  }
}
/** module name: login */
/** module name: router */
export namespace Route {
  export interface RouteInterface {
    path: string
    name: string
    url: string
    permission: string[]
    meta?: object
    sidebar?: boolean
  }

  export interface DbRouteInterface extends RouteInterface {
    id: number
  }

  export type AddRouteParam = RouteInterface
  export type UpdateRouteParam = RouteInterface

  // query params
  export interface QueryParam {
    permission: string
  }

  export interface QueryResult {
    id: number
    path: string
    name: string
    url: string
    permission: string[]
    meta?: object
    sidebar?: boolean
  }
}
/** module name: user */
export namespace Users {
  export interface User {
    id: number
    account: string
    password: string
    nickName: string
    avatarUrl: string
    avatar: string
    cover: string
    status: string | null
    tags: string[] | null
    state: string
    signature: string | null
    email: string | null
    gender: 'male' | 'female' | 'unknown'
    birthday: string | null
    friends: string[] | null
    createdAt: string
    updatedAt: string
    permission: string
  }

  // 注册参数
  export interface RegisterParam {
    nickName: string
    password: string
  }

  // 注册返回结果
  export interface RegisterResponse {
    account: string
  }

  // 登陆参数
  export interface LoginParam {
    account: string
    password: string
  }

  // 登陆返回参数
  export interface LoginResponse {
    id: number
    token: string
  }

  // 获取用户详情参数
  export interface UserDetailsParam {
    id: number
  }

  // 修改用户详情参数
  export type QueryUsers = User[]
}

/** module name: tiktok */
export namespace Tiktok {
  export interface TiktokNavBarTops {
    id: number
    title: string
  }

  export interface TiktokListParams {
    type?: string
  }

  export interface TiktokListResult {
    id: number
    cover: string
    title: string
    link?: string
    tags: { id: number; title: string }[]
  }
}
